<?xml version='1.0' encoding='UTF-8' ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/WEB-INF/templates/templateLogin.xhtml">
	<ui:define name="conteudo">

		<h:body>
			<center>
				<h:form id="loginForm">

					<p:panel>
						<f:facet name="header">Login Usuário</f:facet>

						<div class="dialog">
							<h:panelGrid columns="1" style="width:34.5%;text-align:left" rowClasses="prop">
								<h:panelGrid columns="3" rowClasses="prop"
									columnClasses="name,value">
									<h:link value="Cadastro" outcome="../usuario/salvarUsuario.xhtml" />
									<p:separator style="width: 30%; height: 15px" />
									<h:link value="Contato" outcome="../contato/contato.xhtml" />
								</h:panelGrid>
							</h:panelGrid>
							<h:panelGrid columns="1" rowClasses="prop"
								columnClasses="name,value">
								<h:outputLabel for="username">Login</h:outputLabel>
								<h:inputText size="51" id="username" value="#{loginController.username}" />
								<h:outputLabel for="password">Senha</h:outputLabel>
								<h:inputSecret size="51" id="password" value="#{loginController.password}" />
							</h:panelGrid>
							<h:panelGrid style="width:34.3%;text-align:right" rowClasses="prop">
								<h:commandButton id="submit" value="Entrar" 
									actionListener="#{loginController.logar}" update="panel"/>
							</h:panelGrid>
						</div>
					</p:panel>
				</h:form>
			</center>
		</h:body>

	</ui:define>
</ui:composition>

</html>